<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>首页</title>

<!-- 引入基础的JS和CSS文件 -->
<%@ include file="/common/meta_ext.jsp"%>

<!-- 引入所需的扩展组件 -->
<script src="${ctx}/common/system/public/js/CheckTree.js" type="text/javascript"></script>
<script src="${ctx}/common/system/org/js/ac-role/FuncTreePanel.js" type="text/javascript"></script>

<script type="text/javascript">
Ext.onReady(function(){
 	
 	Ext.QuickTips.init();

	var btns = ['-',{
		text: '保存',
		iconCls: 'icon-save',
		handler: function(){
			funcTreePanel.save();
		}
	},'-',{
		text: '刷新',
		iconCls: 'refresh',
		handler: function(){
			funcTreePanel.reload();
		}
	},'-',{
		text: '全部折叠',
		iconCls: 'icon-collapse-all',
		handler: function(){
			funcTreePanel.collapseAll();
		}
	},'-',{
		text: '全部展开',
		iconCls: 'icon-expand-all',
		handler: function(){
			funcTreePanel.expandAll();
		}
	}];

 	//定义面板,存放权限功能树
 	var funcTreePanel = new Ext.ux.org.acrole.funcTreePanel({
 		roleId: '${roleId}',
 		oldFuncIdsStr: '${oldFuncIdsStr}',
 		frame: false,
 		border: true,
 		tbar: new Ext.Toolbar({items: btns}),
 		bbar: new Ext.Toolbar({items: btns})
 	});
 	
    //定义主界面整体布局
    var viewport = new Ext.Viewport({
    	layout: 'fit',		
		items: [funcTreePanel]
    });
   
});
</script>
</head>
<body>

</body>
</html>